<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>LiquidFun: b2ChainShape Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">LiquidFun
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li class="current"><a href="annotated.html"><span>Classes</span></a></li>
      <li><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="annotated.html"><span>Class&#160;List</span></a></li>
      <li><a href="classes.html"><span>Class&#160;Index</span></a></li>
      <li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
      <li><a href="functions.html"><span>Class&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="classb2_chain_shape-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">b2ChainShape Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="b2_chain_shape_8h_source.html">b2ChainShape.h</a>&gt;</code></p>

<p>Inherits <a class="el" href="classb2_shape.html">b2Shape</a>.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a8c032394f5a85e7fc425a437e7689a18"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8c032394f5a85e7fc425a437e7689a18"></a>
&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a8c032394f5a85e7fc425a437e7689a18">~b2ChainShape</a> ()</td></tr>
<tr class="memdesc:a8c032394f5a85e7fc425a437e7689a18"><td class="mdescLeft">&#160;</td><td class="mdescRight">The destructor frees the vertices using b2Free. <br/></td></tr>
<tr class="separator:a8c032394f5a85e7fc425a437e7689a18"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac257742a52cac391e25962a4c703fb06"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#ac257742a52cac391e25962a4c703fb06">CreateLoop</a> (const <a class="el" href="structb2_vec2.html">b2Vec2</a> *vertices, int32 count)</td></tr>
<tr class="separator:ac257742a52cac391e25962a4c703fb06"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0977339b743c05f2179939ccc38e7e0"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#aa0977339b743c05f2179939ccc38e7e0">CreateChain</a> (const <a class="el" href="structb2_vec2.html">b2Vec2</a> *vertices, int32 count)</td></tr>
<tr class="separator:aa0977339b743c05f2179939ccc38e7e0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aeb2ddbe0c52a98885e91b7c8f597315b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#aeb2ddbe0c52a98885e91b7c8f597315b">SetPrevVertex</a> (const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;prevVertex)</td></tr>
<tr class="separator:aeb2ddbe0c52a98885e91b7c8f597315b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15c7c2821a52266ef57621ac7d34a95f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a15c7c2821a52266ef57621ac7d34a95f">SetNextVertex</a> (const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;nextVertex)</td></tr>
<tr class="separator:a15c7c2821a52266ef57621ac7d34a95f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a651a039aa4584e48df91db8108729bfa"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a651a039aa4584e48df91db8108729bfa"></a>
<a class="el" href="classb2_shape.html">b2Shape</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a651a039aa4584e48df91db8108729bfa">Clone</a> (<a class="el" href="classb2_block_allocator.html">b2BlockAllocator</a> *allocator) const </td></tr>
<tr class="memdesc:a651a039aa4584e48df91db8108729bfa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implement <a class="el" href="classb2_shape.html">b2Shape</a>. Vertices are cloned using b2Alloc. <br/></td></tr>
<tr class="separator:a651a039aa4584e48df91db8108729bfa"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a44bd58b9602dbe57cdfc3b66f8f03b61"><td class="memItemLeft" align="right" valign="top">int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a44bd58b9602dbe57cdfc3b66f8f03b61">GetChildCount</a> () const </td></tr>
<tr class="separator:a44bd58b9602dbe57cdfc3b66f8f03b61"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a614e630221ac7f19257c9351edf4bd12"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a614e630221ac7f19257c9351edf4bd12"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a614e630221ac7f19257c9351edf4bd12">GetChildEdge</a> (<a class="el" href="classb2_edge_shape.html">b2EdgeShape</a> *edge, int32 index) const </td></tr>
<tr class="memdesc:a614e630221ac7f19257c9351edf4bd12"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get a child edge. <br/></td></tr>
<tr class="separator:a614e630221ac7f19257c9351edf4bd12"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4fc27b41ecc556985efacf8e0f91c39f"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a4fc27b41ecc556985efacf8e0f91c39f">TestPoint</a> (const <a class="el" href="structb2_transform.html">b2Transform</a> &amp;transform, const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;p) const </td></tr>
<tr class="separator:a4fc27b41ecc556985efacf8e0f91c39f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad8d6dfc06276b8c282bab1587bc931ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#ad8d6dfc06276b8c282bab1587bc931ef">ComputeDistance</a> (const <a class="el" href="structb2_transform.html">b2Transform</a> &amp;xf, const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;p, float32 *distance, <a class="el" href="structb2_vec2.html">b2Vec2</a> *normal, int32 childIndex) const </td></tr>
<tr class="separator:ad8d6dfc06276b8c282bab1587bc931ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85c7a17a15581e0e258c7af561cf5403"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a85c7a17a15581e0e258c7af561cf5403"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a85c7a17a15581e0e258c7af561cf5403">RayCast</a> (<a class="el" href="structb2_ray_cast_output.html">b2RayCastOutput</a> *output, const <a class="el" href="structb2_ray_cast_input.html">b2RayCastInput</a> &amp;input, const <a class="el" href="structb2_transform.html">b2Transform</a> &amp;transform, int32 childIndex) const </td></tr>
<tr class="memdesc:a85c7a17a15581e0e258c7af561cf5403"><td class="mdescLeft">&#160;</td><td class="mdescRight">Implement <a class="el" href="classb2_shape.html">b2Shape</a>. <br/></td></tr>
<tr class="separator:a85c7a17a15581e0e258c7af561cf5403"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a409c21206e4c84f66700809aac5b164c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a409c21206e4c84f66700809aac5b164c">ComputeAABB</a> (<a class="el" href="structb2_a_a_b_b.html">b2AABB</a> *aabb, const <a class="el" href="structb2_transform.html">b2Transform</a> &amp;transform, int32 childIndex) const </td></tr>
<tr class="separator:a409c21206e4c84f66700809aac5b164c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a009259d589abebeda27fe580d117b11e"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a009259d589abebeda27fe580d117b11e">ComputeMass</a> (<a class="el" href="structb2_mass_data.html">b2MassData</a> *massData, float32 density) const </td></tr>
<tr class="separator:a009259d589abebeda27fe580d117b11e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_methods_classb2_shape"><td colspan="2" onclick="javascript:toggleInherit('pub_methods_classb2_shape')"><img src="closed.png" alt="-"/>&#160;Public Member Functions inherited from <a class="el" href="classb2_shape.html">b2Shape</a></td></tr>
<tr class="memitem:a3b6093f16c18f8a877519a29674abca0 inherit pub_methods_classb2_shape"><td class="memItemLeft" align="right" valign="top">Type&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_shape.html#a3b6093f16c18f8a877519a29674abca0">GetType</a> () const </td></tr>
<tr class="separator:a3b6093f16c18f8a877519a29674abca0 inherit pub_methods_classb2_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:a481116a6886fb3880b13e55c966579da"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a481116a6886fb3880b13e55c966579da"></a>
<a class="el" href="structb2_vec2.html">b2Vec2</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#a481116a6886fb3880b13e55c966579da">m_vertices</a></td></tr>
<tr class="memdesc:a481116a6886fb3880b13e55c966579da"><td class="mdescLeft">&#160;</td><td class="mdescRight">The vertices. Owned by this class. <br/></td></tr>
<tr class="separator:a481116a6886fb3880b13e55c966579da"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab2ad711781e6ac81179074e90e0e058b"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ab2ad711781e6ac81179074e90e0e058b"></a>
int32&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classb2_chain_shape.html#ab2ad711781e6ac81179074e90e0e058b">m_count</a></td></tr>
<tr class="memdesc:ab2ad711781e6ac81179074e90e0e058b"><td class="mdescLeft">&#160;</td><td class="mdescRight">The vertex count. <br/></td></tr>
<tr class="separator:ab2ad711781e6ac81179074e90e0e058b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3a42d4c6b2421bc5badda3b6164949cf"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a3a42d4c6b2421bc5badda3b6164949cf"></a>
<a class="el" href="structb2_vec2.html">b2Vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><b>m_prevVertex</b></td></tr>
<tr class="separator:a3a42d4c6b2421bc5badda3b6164949cf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af3716ef780dd5bcd905e350d8854aaa2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="af3716ef780dd5bcd905e350d8854aaa2"></a>
<a class="el" href="structb2_vec2.html">b2Vec2</a>&#160;</td><td class="memItemRight" valign="bottom"><b>m_nextVertex</b></td></tr>
<tr class="separator:af3716ef780dd5bcd905e350d8854aaa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8a6ffbb9de0e2b8545c8b4fc8aa77249"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a8a6ffbb9de0e2b8545c8b4fc8aa77249"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>m_hasPrevVertex</b></td></tr>
<tr class="separator:a8a6ffbb9de0e2b8545c8b4fc8aa77249"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a333b74486566e73c3cf1f7da5e69a96e"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a333b74486566e73c3cf1f7da5e69a96e"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>m_hasNextVertex</b></td></tr>
<tr class="separator:a333b74486566e73c3cf1f7da5e69a96e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_attribs_classb2_shape"><td colspan="2" onclick="javascript:toggleInherit('pub_attribs_classb2_shape')"><img src="closed.png" alt="-"/>&#160;Public Attributes inherited from <a class="el" href="classb2_shape.html">b2Shape</a></td></tr>
<tr class="memitem:adb051791133b24f53c6e9a565a7b7bbb inherit pub_attribs_classb2_shape"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="adb051791133b24f53c6e9a565a7b7bbb"></a>
Type&#160;</td><td class="memItemRight" valign="bottom"><b>m_type</b></td></tr>
<tr class="separator:adb051791133b24f53c6e9a565a7b7bbb inherit pub_attribs_classb2_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5de7a9bd3f9e72ef7025a65c304aaf1a inherit pub_attribs_classb2_shape"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="a5de7a9bd3f9e72ef7025a65c304aaf1a"></a>
float32&#160;</td><td class="memItemRight" valign="bottom"><b>m_radius</b></td></tr>
<tr class="separator:a5de7a9bd3f9e72ef7025a65c304aaf1a inherit pub_attribs_classb2_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="inherited"></a>
Additional Inherited Members</h2></td></tr>
<tr class="inherit_header pub_types_classb2_shape"><td colspan="2" onclick="javascript:toggleInherit('pub_types_classb2_shape')"><img src="closed.png" alt="-"/>&#160;Public Types inherited from <a class="el" href="classb2_shape.html">b2Shape</a></td></tr>
<tr class="memitem:a4c1f3a9ad6b3150bb90ad9018ca4b1e0 inherit pub_types_classb2_shape"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><b>Type</b> { <br/>
&#160;&#160;<b>e_circle</b> = 0, 
<b>e_edge</b> = 1, 
<b>e_polygon</b> = 2, 
<b>e_chain</b> = 3, 
<br/>
&#160;&#160;<b>e_typeCount</b> = 4
<br/>
 }</td></tr>
<tr class="separator:a4c1f3a9ad6b3150bb90ad9018ca4b1e0 inherit pub_types_classb2_shape"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A chain shape is a free form sequence of line segments. The chain has two-sided collision, so you can use inside and outside collision. Therefore, you may use any winding order. Since there may be many vertices, they are allocated using b2Alloc. Connectivity information is used to create smooth collisions. WARNING: The chain will not collide properly if there are self-intersections. </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a409c21206e4c84f66700809aac5b164c"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void b2ChainShape::ComputeAABB </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structb2_a_a_b_b.html">b2AABB</a> *&#160;</td>
          <td class="paramname"><em>aabb</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structb2_transform.html">b2Transform</a> &amp;&#160;</td>
          <td class="paramname"><em>transform</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32&#160;</td>
          <td class="paramname"><em>childIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classb2_shape.html#a88e9807fab0c8ca9a98d8926e50a1411">b2Shape::ComputeAABB</a> </dd></dl>

<p>Implements <a class="el" href="classb2_shape.html#a88e9807fab0c8ca9a98d8926e50a1411">b2Shape</a>.</p>

</div>
</div>
<a class="anchor" id="ad8d6dfc06276b8c282bab1587bc931ef"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void b2ChainShape::ComputeDistance </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structb2_transform.html">b2Transform</a> &amp;&#160;</td>
          <td class="paramname"><em>xf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float32 *&#160;</td>
          <td class="paramname"><em>distance</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="structb2_vec2.html">b2Vec2</a> *&#160;</td>
          <td class="paramname"><em>normal</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32&#160;</td>
          <td class="paramname"><em>childIndex</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Compute the distance from the current shape to the specified point. This only works for convex shapes. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">xf</td><td>the shape world transform. </td></tr>
    <tr><td class="paramname">p</td><td>a point in world coordinates. </td></tr>
    <tr><td class="paramname">distance</td><td>returns the distance from the current shape. </td></tr>
    <tr><td class="paramname">normal</td><td>returns the direction in which the distance increases. </td></tr>
  </table>
  </dd>
</dl>

<p>Implements <a class="el" href="classb2_shape.html#aa86f47d864e8236aacc7e922e5d3979a">b2Shape</a>.</p>

</div>
</div>
<a class="anchor" id="a009259d589abebeda27fe580d117b11e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void b2ChainShape::ComputeMass </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structb2_mass_data.html">b2MassData</a> *&#160;</td>
          <td class="paramname"><em>massData</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">float32&#160;</td>
          <td class="paramname"><em>density</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Chains have zero mass. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classb2_shape.html#a61b365526241b47f124789b0309cac69">b2Shape::ComputeMass</a> </dd></dl>

<p>Implements <a class="el" href="classb2_shape.html#a61b365526241b47f124789b0309cac69">b2Shape</a>.</p>

</div>
</div>
<a class="anchor" id="aa0977339b743c05f2179939ccc38e7e0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2ChainShape::CreateChain </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structb2_vec2.html">b2Vec2</a> *&#160;</td>
          <td class="paramname"><em>vertices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a chain with isolated end vertices. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertices</td><td>an array of vertices, these are copied </td></tr>
    <tr><td class="paramname">count</td><td>the vertex count </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac257742a52cac391e25962a4c703fb06"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2ChainShape::CreateLoop </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structb2_vec2.html">b2Vec2</a> *&#160;</td>
          <td class="paramname"><em>vertices</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int32&#160;</td>
          <td class="paramname"><em>count</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Create a loop. This automatically adjusts connectivity. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">vertices</td><td>an array of vertices, these are copied </td></tr>
    <tr><td class="paramname">count</td><td>the vertex count </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a44bd58b9602dbe57cdfc3b66f8f03b61"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">int32 b2ChainShape::GetChildCount </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classb2_shape.html#a05a3c445017d96df9238ceefe6ce37ab" title="Get the number of child primitives. ">b2Shape::GetChildCount</a> </dd></dl>

<p>Implements <a class="el" href="classb2_shape.html#a05a3c445017d96df9238ceefe6ce37ab">b2Shape</a>.</p>

</div>
</div>
<a class="anchor" id="a15c7c2821a52266ef57621ac7d34a95f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2ChainShape::SetNextVertex </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;&#160;</td>
          <td class="paramname"><em>nextVertex</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Establish connectivity to a vertex that follows the last vertex. Don't call this for loops. </p>

</div>
</div>
<a class="anchor" id="aeb2ddbe0c52a98885e91b7c8f597315b"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void b2ChainShape::SetPrevVertex </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;&#160;</td>
          <td class="paramname"><em>prevVertex</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Establish connectivity to a vertex that precedes the first vertex. Don't call this for loops. </p>

</div>
</div>
<a class="anchor" id="a4fc27b41ecc556985efacf8e0f91c39f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool b2ChainShape::TestPoint </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="structb2_transform.html">b2Transform</a> &amp;&#160;</td>
          <td class="paramname"><em>transform</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structb2_vec2.html">b2Vec2</a> &amp;&#160;</td>
          <td class="paramname"><em>p</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td> const</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>This always return false. </p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="classb2_shape.html#a6ac968e403e2d93e8ae46d728a2e50fa">b2Shape::TestPoint</a> </dd></dl>

<p>Implements <a class="el" href="classb2_shape.html#a6ac968e403e2d93e8ae46d728a2e50fa">b2Shape</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li><a class="el" href="b2_chain_shape_8h_source.html">b2ChainShape.h</a></li>
<li>b2ChainShape.cpp</li>
</ul>
</div><!-- contents -->
<!-- Google Analytics -->
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-46159502-1', 'auto');
ga('create', 'UA-49880327-7', 'auto', {'name': 'liquidFunTracker'});
ga('send', 'pageview');
ga('liquidFunTracker.send', 'pageview');
</script>
</body>
</html>
